<?php

class Content_Model_Post extends Nuo_Db_Table_Row
{

	/**
	 * object type
	 * @property string
	 */
	protected $_objectType = 'content.post';

	/**
	 * identity
	 * @return int
	 */
	public function getId()
	{
		return $this -> post_id;
	}

	/**
	 * post title
	 * @return string
	 */
	public function getTitle()
	{
		return $this -> post_title;
	}

	/**
	 * post status
	 * @return string [draft, publish, unpubish, expired]
	 */
	public function getStatus()
	{
		return $this -> post_status;
	}

	/**
	 * author name
	 * @return string
	 */
	public function getAuthor()
	{
		return $this -> post_author;
	}

	/**
	 * get summary
	 * @return string
	 */
	public function getSummary()
	{
		return $this -> post_summary;
	}

	/**
	 * get post full content
	 * @return string
	 */
	public function getContent()
	{
		return $this -> post_content;
	}

	/**
	 * get updated by
	 * @return User_Model_User
	 */
	public function getCreatedBy()
	{
		return Nuo::getObject($this -> created_by, 'user');
	}

	/**
	 * get created by
	 * @return
	 */
	public function getUpdatedBy()
	{
		return Nuo::getObject($this -> updated_by, 'user');
	}

	/**
	 * get updated date
	 * @return date
	 */
	public function getUpdatedDate()
	{
		return $this -> updated_date;
	}

	/**
	 * get created date
	 * @return date
	 */
	public function getCreatedDate()
	{
		return $this -> created_date;

	}

	/**
	 * get post slug
	 * @return string
	 */
	public function getSlug()
	{
		return $this -> slug;
	}

	public function getHref()
	{
		return '/nuo/post/index/detail/id' . $this -> getId();
	}

}
